Micron Document




Second-generation programming language
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
top
The label of second-generation programming language (2GL) is a generational way to categorize assembly languages.cite-ref-computer-hope-1-0[1]cite-ref-brookshear-2-0[2]cite-ref-0-3-0[3] They belong to the low-level programming languages.

The term was coined to provide a distinction from higher level machine independent third-generation programming languages (3GLs) (such as COBOL, C, or Java) and earlier first-generation programming languages (machine code)cite-ref-brookshear-2-1[2]cite-ref-1-4-0[4]

Contents


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Second-generation programming language

Second-generation programming languages have the following properties:

• Lines within a program correspond directly to processor commands, essentially acting as a mnemonic device overlaying a first generation programming language.
• The code can be read and written by a programmer. To run on a computer it must be converted into a machine readable form, a process called assembly.cite-ref-1-4-1[4]
• The language is specific to a particular processor family and environment.cite-ref-brookshear-2-2[2]

Second-generation languages are sometimes used for parts of kernels or device drivers, and are sometimes used in video games, graphics programs, and other intensive programs.cite-ref-computer-hope-1-1[1]

In modern programs, second generation assembly languages are rarely used.cite-ref-5[5] Programming in second generation languages may yield speed benefits, but several disadvantages have led to its decline:

• Programming is expressed in terms of individual processor instructions, rather than higher level logic.cite-ref-brookshear-2-3[2]cite-ref-0-3-1[3]
• Low-level memory and hardware details must be manually managed which is often bug-prone.cite-ref-brookshear-2-4[2]
• Programs are machine-dependent, so different versions must be written for every target machine architecture.cite-ref-0-3-2[3]

The vast majority of programs are written in a third-generation programming language or a fourth-generation programming language. Assembly's main advantage, speed, has degraded by the fact that well written C code can often be as fast or even faster than handwritten assembly.cite-ref-brookshear-2-5[2]cite-ref-6[6]

Second generation languages are perhaps most significant in their place in computing history. For a long time, Second generation assembly languages were the only good option for development for many machines, such as the NES or the Commodore 64.cite-ref-7[7]cite-ref-8[8] Second generation languages represented a massive step away from the tradition of programmers conforming to the needs of a machine, and the first step towards the machine accommodating for the programmer, a phenomenon that would be repeated in all subsequent programming language generations.cite-ref-brookshear-2-6[2]cite-ref-0-3-3[3]

References

cite-note-computer-hope-11. "Computer Hope, Generation languages"
cite-note-brookshear-22. citerefbrookshear2012Brookshear, J. Glenn (2012). Computer science : an overview (11th ed.). Addison-Wesley. pp. 240–241. ISBN 978-0-13-256903-3.
cite-note-0-33. citerefvassVass, Péter. "Programming Language generations and Programming Paradigms" (PDF).
cite-note-1-44. "What Are Programming Language Generations?". wiseGEEK. Retrieved 2019-06-11.
cite-note-55. "Top Computer Languages 2019 - StatisticsTimes.com". statisticstimes.com. Archived from the original on 2019-06-12. Retrieved 2019-06-11.
cite-note-66. citerefwallsWalls, Colin. "Why C is faster than assembly". Mentor, a Sieman's Business. Mentor Inc. Archived from the original on 2020-01-29. Retrieved 11 June 2019.
cite-note-77. citerefcommodore-corporationCommodore corporation. "C64 programmer's reference" (PDF). Commodore corporation. Retrieved 11 June 2019.
cite-note-88. citerefwikibooks-contributorsWikibooks contributors. "NES assembly". Wikibooks: NES Assembly. Retrieved 11 June 2019. {{cite web}}: |author1= has generic name (help)